<?php
	if(isset($_GET['pwd']) && isset($_GET['id']))
	{
		if(isset($_GET['flag']))
		{
			setcookie('studialuserpwd', $_GET['pwd'], '/');
			setcookie('studialuserid', $_GET['id'], '/');
		}
		else
		{	
			setcookie('studialuserpwd', $_GET['pwd'], time() + 3600 * 24 * 30, '/');
			setcookie('studialuserid', $_GET['id'], time() + 3600 * 24 * 30, '/');
		}
		header('Location: users/homeboard.php?id='.$_GET['id']);
	}
	else
	{
		header('Location: unlogged/index.php');
	}

?>